import {http} from "@/interceptor/luch-request/index.js"


// 创建角色
export const saveBatch = (data) => {
    return http.post("api/admin/basicRoleMenu/v1/saveBatch", data,{
	header:{
			"content-type": "application/json"
		}
	});	
}
// 编辑角色
export const updateBatch = (data) => {
    return http.put("api/admin/basicRoleMenu/v1/updateBatch", data,{
	header:{
			"content-type": "application/json"
		}
	});	
}

// 角色列表
export const rolelist = (data) => {
	return http.get("api/admin/basicRole/v1/subLevel", {
		data: data
	});
}
 
// 角色列表
export const roleselect = (data) => {
 	return http.get("api/admin/basicRole/v1/select", {
 		data: data
 	});
 }
 
// 删除角色
 export const deleteRole = (id) => {
  	return http.delete("api/admin/basicRole/v1/deleteRole/"+id, {
  		header:{
  			"content-type": "application/x-www-form-urlencoded"
  		}
  	});
 }
 // 角色树
 export const listApplicationRole = (data) => {
  	return http.get("api/admin/basicRole/v1/listApplicationRole", {
  		data: data
  	});
  }